1. Field of the Invention
The present invention relates to an exposure compensation method for a digital image, and more particularly relates to automatic analysis and adjustment of exposure levels for a digital image.
2. Description of the Related Art
Digital images from digital cameras (or digital static cameras abbreviated as DSCs) are becoming more and more popular. However, most people do not take perfect photographs. It is estimated that the majority of digital cameras have exposure shortcomings. For example, the whole digital images may be too dark or too bright so that the profiles of real objects are hardly recognized, mainly due to extreme brightness in the background.
Several conventional methods for adjusting exposure levels or values of digital images have been put forth to resolve the aforesaid exposure problem. One of the methods is to adjust the brightness average of specified green pixels to be a middle value of brightness. In an image with 8-bit color depth, the brightness (or luminance denoted by Y) values range from 0 to 255; the brightness average is preferably proximate to 127, a mid-tone luminance value, for human eyes to see a digital image having a certain exposure value. Such an exposure value can be designated as an automatic exposure value for a digital camera to capture a digital image. The corresponding brightness values of only the specified green pixels are used to calculate the brightness average, while other pixels are ignored. Furthermore, as shown in FIG. 1, the brightness values of the green pixels in the center area of the digital image are weighted with a larger factor Wh (for example, equal to 2) for the calculation of the brightness average. Similarly, the brightness values of the green pixels in the outer area of the digital image are weighted with a smaller factor Wl (for example, equal to 1). FIG. 2 shows a sensing unit of an image-capture device. The specific green pixels are selected from the group of all pixels Gr and Gb. The sensing unit is a mosaic arrangement with four by four pixels. This method is easily implemented in the automatic exposure compensation circuit of a digital camera, but the designated exposure value is not adequate to clearly show real objects, especially when the background surrounding the objects is either very bright or very dark.
Several conventional methods can slightly improve the accuracy of the automatic exposure value, but more complicated calculation is needed. First, a frame is divided into a plurality of sub-regions and the luminance value of each basic mosaic cell in a sub-region is determined according to a predetermined computational formula. Each luminance value is respectively compared with a high threshold and a low threshold. When most of the luminance values are larger than the high threshold, the corresponding sub-region is too bright. In contrast, the corresponding sub-region is too dark when most of the luminance values are less than the low threshold. Finally, the automatic exposure compensation circuit can determine whether the whole frame has underexposure, proper exposure or overexposure according to the aforesaid comparison results of the sub-regions so as to adjust the automatic exposure value. However, such methods or circuits are only dependent on the luminance values so that real objects appearing in the frame are very likely to be overlooked in some special circumstances.
In conclusion, the aforesaid methods generally cannot avoid the overexposure of objects in front of a black background or the underexposure of objects in front of a white background. The users have no choice but to manually adjust the exposure value. Therefore, an automatic exposure compensation method is needed for extreme backgrounds or  environments so that the objects are shown clearly in captured digital images.